Skip to content

repr(C) on enums#1183

Merged
bors-servo merged 2 commits into
rust-lang:masterfrom
fitzgen:repr-c-on-enums
Dec 14, 2017
Merged

repr(C) on enums#1183
bors-servo merged 2 commits into
rust-lang:masterfrom
fitzgen:repr-c-on-enums

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Dec 9, 2017

@highfive
Copy link
Copy Markdown

highfive commented Dec 9, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@fitzgen fitzgen force-pushed the repr-c-on-enums branch 2 times, most recently from 978f221 to d43faa4 Compare December 12, 2017 19:05
If we don't, then eddyb's recent layout optimizations will do unexpected things
to them.

We also need to handle empty `enum`s without variants. When `repr(C)` is on a
Rust `enum`, it cannot be empty, so we need to add a dummy.
@fitzgen
Copy link
Copy Markdown
Member Author

fitzgen commented Dec 12, 2017

@emilio fixed so that both repr(C) and repr(i32) (or whatever) are added. Also fixed other libclang versions test expectations.

@emilio
Copy link
Copy Markdown
Contributor

emilio commented Dec 14, 2017

@bors-servo r+

@bors-servo
Copy link
Copy Markdown

📌 Commit 43c43ba has been approved by emilio

@bors-servo
Copy link
Copy Markdown

⌛ Testing commit 43c43ba with merge 84f8e18...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
@bors-servo
Copy link
Copy Markdown

☀️ Test successful - status-travis
Approved by: emilio
Pushing 84f8e18 to master...

@bors-servo bors-servo merged commit 43c43ba into rust-lang:master Dec 14, 2017
@fitzgen fitzgen deleted the repr-c-on-enums branch December 14, 2017 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants